// function add(...rest){
//     let total=0;
//     rest.forEach(item=>total+=item)
//     return total
// }
// console.log(add(10,20,30,40));
let arr=[10,20,30,40]
console.log(Math.max(...arr));
let arr1=[10,20,30]
let arr2=[40,50,60]
let arr3=[...arr1,...arr2]
let arr3=arr1.concat(arr2)
console.log(arr3);